package com.oceantrader.sale.biz.staff.pojo;

import com.oceantrader.sale.commons.pojo.PageParam;
import com.xuesinuo.xtool.Np;

import io.vertx.core.MultiMap;
import lombok.Data;
import lombok.EqualsAndHashCode;

/** 员工：查询参数 */
@Data
@EqualsAndHashCode(callSuper = true)
public class StaffSearchParam extends PageParam {
    private String code;
    private String codeLikeR;
    private String nick;
    private String nickLike;
    private String phone;
    private String phoneLikeR;
    private Boolean enable;

    @Override
    public void putMultiMap(MultiMap multiMap) {
        super.putMultiMap(multiMap);
        this.code = multiMap.get("code");
        this.codeLikeR = multiMap.get("codeLikeR");
        this.nick = multiMap.get("nick");
        this.nickLike = multiMap.get("nickLike");
        this.phone = multiMap.get("phone");
        this.phoneLikeR = multiMap.get("phoneLikeR");
        this.enable = Np.i(multiMap.get("enable")).x(x -> Boolean.parseBoolean(x)).o();
    }
}
